<%@ page import="java.util.Date" %>
<%@ page import="myschool.entity.Student" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2023-06-13
  Time: 14:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
  <%
      String p[]={"西红柿","桃子","杏子","苹果"};
      request.setAttribute("msg",new Date());
      request.setAttribute("f",p);
      Student stu=new Student();
      stu.setAddress("阜阳");
      stu.setQQ("1o9333");
      stu.setSname("南霸天");
      request.setAttribute("student",stu);

      pageContext.setAttribute("tip","tip in page");
      request.setAttribute("tip","tip in requsest");
      session.setAttribute("tip","tip in session");
      application.setAttribute("tip","tip in application");
  %>
<h1>${msg}</h1>
<h1>${f},,,${f[0]}</h1>
<h1>${student}.........${student.sname},${student.QQ}</h1>
<h1>${student['address']}</h1>
<hr/>
<h1>${obj.ssss}</h1>
  <!-- 对象存在，属性不存在，报错-->
<%--<h2>${student.shoujihao}</h2>--%>
<div style="color: red">
    ${tip}
</div>
<div>
    session:${sessionScope.tip}
</div>
</body>
</html>
